# 公共配置文件

# 公共配置
PUBLIC = {
    'oss_url': 'https://flower-1.oss-cn-shanghai.aliyuncs.com',
    'default_page_size': 20,
    'max_page_size': 100,
}

# 微信小程序配置
WECHAT_CONFIG = {
    'app_id': 'wxc66c9ba4701d37b2',
    'app_secret': 'your-wechat-secret-here',  # 需要在微信公众平台获取
    'login_url': 'https://api.weixin.qq.com/sns/jscode2session',
}

# OSS配置
OSS_CONFIG = {
    'access_key_id': 'LTAI5tB4SRQak2Ljwuyq1U5L',
    'access_key_secret': 'sq5Bf9sKxISjvnrkeLV3aYSNR2UQAp',
    'bucket_name': 'flower-1',
    'endpoint': 'oss-cn-shanghai.aliyuncs.com',
    'url': 'https://flower-1.oss-cn-shanghai.aliyuncs.com',
}

# 订单状态配置
ORDER_STATUS_CHOICES = [
    ('PENDING', '待付款'),
    ('PAID', '已付款'),
    ('SHIPPED', '已发货'),
    ('DELIVERED', '已送达'),
    ('CANCELLED', '已取消'),
    ('REFUNDED', '已退款'),
]

# 支付方式配置
PAYMENT_METHOD_CHOICES = [
    ('WECHAT', '微信支付'),
    ('ALIPAY', '支付宝'),
]
# 配送方式配置
DELIVERY_METHOD_CHOICES = [
    ('EXPRESS', '快递配送'),
    ('SAME_DAY', '同城配送'),
    ('PICKUP', '到店自提'),
]

# 数据库配置
class Config:
    # MySQL配置
    MYSQL_HOST = '106.14.20.126'
    MYSQL_PORT = '3306'
    MYSQL_DATABASE = 'flower2'
    MYSQL_USER = 'qing'
    MYSQL_PASSWORD = 'T851w682@'
    
    # Redis配置
    REDIS_HOST = '106.14.20.126'
    REDIS_PORT = 6379
    REDIS_PASSWORD = 'T851w682@'
    REDIS_DB = 1

# 创建配置实例
config = Config()
